package com.ponhu.ea2.stockcenter.provider.service.entity.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ponhu.ea2.stockcenter.provider.entity.GWallApplyFreeStock;
import com.ponhu.ea2.stockcenter.provider.mapper.GWallDataMapper;
import com.ponhu.ea2.stockcenter.provider.service.entity.GWallDataService;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

@Service
public class GWallDataServiceImpl
        extends ServiceImpl<GWallDataMapper, GWallApplyFreeStock>
        implements GWallDataService {

    @Override
    public List<GWallApplyFreeStock> getFreeStockList(Collection<String> inventoryCodes) {

        LambdaQueryWrapper<GWallApplyFreeStock> queryWrapper = Wrappers
                .lambdaQuery(GWallApplyFreeStock.class)
                .in(GWallApplyFreeStock::getInventoryCode, inventoryCodes);

        return list(queryWrapper);
    }

}




